
package model;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Team-2
 */
@Entity
@Table(name = "TRANSACTION_CARD")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "TransactionCard.findAll", query = "SELECT t FROM TransactionCard t"),
    @NamedQuery(name = "TransactionCard.findByBarcode", query = "SELECT t FROM TransactionCard t WHERE t.barcode = :barcode"),
    @NamedQuery(name = "TransactionCard.findByRegNumber", query = "SELECT t FROM TransactionCard t WHERE t.regNumber = :regNumber"),
    @NamedQuery(name = "TransactionCard.findByDescription", query = "SELECT t FROM TransactionCard t WHERE t.description = :description"),
    @NamedQuery(name = "TransactionCard.findByKatohos", query = "SELECT t FROM TransactionCard t WHERE t.katohos = :katohos"),
    @NamedQuery(name = "TransactionCard.findByPaymentTimestamp", query = "SELECT t FROM TransactionCard t WHERE t.paymentTimestamp = :paymentTimestamp"),
    @NamedQuery(name = "TransactionCard.findByBalance", query = "SELECT t FROM TransactionCard t WHERE t.balance = :balance"),
    @NamedQuery(name = "TransactionCard.findByOldBalance", query = "SELECT t FROM TransactionCard t WHERE t.oldBalance = :oldBalance"),
    @NamedQuery(name = "TransactionCard.findByStationId", query = "SELECT t FROM TransactionCard t WHERE t.stationId = :stationId")})

public class TransactionCard implements Serializable {
    private static final long serialVersionUID = 1L;
    @Column(name = "BARCODE")
    @Id
    private Integer barcode;
    @Column(name = "REG_NUMBER")
    private String regNumber;
    @Column(name = "DESCRIPTION")
    private String description;
    @Column(name = "KATOHOS")
    private String katohos;
    @Basic(optional = false)
    @Column(name = "PAYMENT_TIMESTAMP")
    @Temporal(TemporalType.DATE)
    private Date paymentTimestamp;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Column(name = "BALANCE")
    private Double balance;
    @Column(name = "OLD_BALANCE")
    private BigDecimal oldBalance;
    @Column(name = "STATION_ID")
    private Integer stationId;

    public TransactionCard() {
    }

    public Integer getBarcode() {
        return barcode;
    }

    public void setBarcode(Integer barcode) {
        this.barcode = barcode;
    }

    public String getRegNumber() {
        return regNumber;
    }

    public void setRegNumber(String regNumber) {
        this.regNumber = regNumber;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getKatohos() {
        return katohos;
    }

    public void setKatohos(String katohos) {
        this.katohos = katohos;
    }

    public Date getPaymentTimestamp() {
        return paymentTimestamp;
    }

    public void setPaymentTimestamp(Date paymentTimestamp) {
        this.paymentTimestamp = paymentTimestamp;
    }

    public Double getBalance() {
        return balance;
    }

    public void setBalance(Double balance) {
        this.balance = balance;
    }

    public BigDecimal getOldBalance() {
        return oldBalance;
    }

    public void setOldBalance(BigDecimal oldBalance) {
        this.oldBalance = oldBalance;
    }

    public Integer getStationId() {
        return stationId;
    }

    public void setStationId(Integer stationId) {
        this.stationId = stationId;
    }
    
}
